import { defineConfig } from "vitepress";
import { set_sidebar } from "./utils/auto_sidebar";

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "Mikaisa的个人博客",
  description: "学无止境",
  head: [["link", { rel: "icon", href: "/mikaisa-blog/head.png" }]],

  themeConfig: {
    logo: "logo.png",

    outlineTitle: "目录",
    outline: [2, 6],

    // https://vitepress.dev/reference/default-theme-config
    nav: [
      {
        text: "简明教程",
        items: [
          { text: "H5+C3", link: "/src/concise-tutorial/HTML5+CSS3" },
          { text: "Vue", link: "/src/concise-tutorial/vue" },
          { text: "JS高级", link: "/src/concise-tutorial/JS高级" },
          { text: "JS设计模式", link: "/src/concise-tutorial/JS设计模式" },
          { text: "ES6~ES13", link: "/src/concise-tutorial/ES6-ES13" },
          { text: "NestJS", link: "/src/concise-tutorial/NestJS" },
          { text: "React19", link: "/src/concise-tutorial/React19" },
          { text: "前端算法", link: "/src/concise-tutorial/前端算法" },
          { text: "Vite", link: "/src/concise-tutorial/vite" },
          { text: "MySQL", link: "/src/concise-tutorial/MySQL" },
          { text: "英语语法", link: "/src/concise-tutorial/英语语法" },
        ],
      },
      {
        text: "技术文档",
        items: [
          { text: "HTML5", link: "/src/tech-docs/HTML5" },
          { text: "CSS3", link: "/src/tech-docs/CSS3" },
          { text: "SCSS", link: "/src/tech-docs/SCSS" },
          { text: "开发技巧", link: "/src/tech-docs/dev-skills" },
          { text: "JavaScript", link: "/src/tech-docs/JavaScript" },
          { text: "Vue2", link: "/src/tech-docs/vue2" },
          { text: "Vue3", link: "/src/tech-docs/vue3" },
          { text: "TypeScript", link: "/src/tech-docs/TypeScript" },
          { text: "nodejs", link: "/src/tech-docs/nodejs" },
          { text: "架构", link: "/src/tech-docs/architects" },
          { text: "算法", link: "/src/tech-docs/algorithm" },
          { text: "Git", link: "/src/tech-docs/git" },
        ],
      },
      {
        text: "常见面试问题",
        items: [
          { text: "HTML5", link: "/src/normal-questions/html5" },
          { text: "CSS3", link: "/src/normal-questions/css3" },
          { text: "JavaScript", link: "/src/normal-questions/javascript" },
          { text: "TypeScript", link: "/src/normal-questions/typescript" },
          { text: "Vue3", link: "/src/normal-questions/vue3" },
          { text: "场景面试题", link: "/src/normal-questions/scene" },
          { text: "计算机网络", link: "/src/normal-questions/network" },
        ],
      },
      // { text: "一些随笔", link: "/markdown-examples" },
    ],

    sidebar: {
      // 简明教程模块
      "/src/concise-tutorial/HTML5+CSS3": set_sidebar(
        "/src/concise-tutorial/HTML5+CSS3"
      ),
      "/src/concise-tutorial/Cooking": set_sidebar(
        "/src/concise-tutorial/Cooking"
      ),
      "/src/concise-tutorial/vue": set_sidebar("/src/concise-tutorial/vue"),
      "/src/concise-tutorial/JS高级": set_sidebar(
        "/src/concise-tutorial/JS高级"
      ),
      "/src/concise-tutorial/JS设计模式": set_sidebar(
        "/src/concise-tutorial/JS设计模式"
      ),
      "/src/concise-tutorial/ES6-ES13": set_sidebar(
        "/src/concise-tutorial/ES6-ES13"
      ),
      "/src/concise-tutorial/NestJS": set_sidebar(
        "/src/concise-tutorial/NestJS"
      ),
      "/src/concise-tutorial/React19": set_sidebar(
        "/src/concise-tutorial/React19"
      ),
      "/src/concise-tutorial/vite": set_sidebar("/src/concise-tutorial/vite"),
      "/src/concise-tutorial/前端算法": set_sidebar(
        "/src/concise-tutorial/前端算法"
      ),
      "/src/concise-tutorial/MySQL": set_sidebar("/src/concise-tutorial/MySQL"),
      "/src/concise-tutorial/英语语法": set_sidebar(
        "/src/concise-tutorial/英语语法"
      ),

      // 面试题模块
      "/src/normal-questions/html5": set_sidebar("/src/normal-questions/html5"),
      "/src/normal-questions/css3": set_sidebar("/src/normal-questions/css3"),
      "/src/normal-questions/typescript": set_sidebar(
        "/src/normal-questions/typescript"
      ),
      "/src/normal-questions/vue3": set_sidebar("/src/normal-questions/vue3"),
      "/src/normal-questions/scene": set_sidebar("/src/normal-questions/scene"),
      "/src/normal-questions/network": set_sidebar(
        "/src/normal-questions/network"
      ),

      // 常见问题模块
      "/src/normal-questions/javascript": set_sidebar(
        "/src/normal-questions/javascript"
      ),

      // 技术文档模块
      "/src/tech-docs/HTML5": set_sidebar("/src/tech-docs/HTML5"),
      "/src/tech-docs/CSS3": set_sidebar("/src/tech-docs/CSS3"),
      "/src/tech-docs/SCSS": set_sidebar("/src/tech-docs/SCSS"),
      "/src/tech-docs/JavaScript": set_sidebar("/src/tech-docs/JavaScript"),
      "/src/tech-docs/TypeScript": set_sidebar("/src/tech-docs/TypeScript"),
      "/src/tech-docs/nodejs": set_sidebar("/src/tech-docs/nodejs"),
      "/src/tech-docs/vue2": set_sidebar("/src/tech-docs/vue2"),
      "/src/tech-docs/vue3": set_sidebar("/src/tech-docs/vue3"),
      "/src/tech-docs/dev-skills": set_sidebar("/src/tech-docs/dev-skills"),
      "/src/tech-docs/architects": set_sidebar("/src/tech-docs/architects"),
      "/src/tech-docs/algorithm": set_sidebar("/src/tech-docs/algorithm"),
      "/src/tech-docs/git": set_sidebar("/src/tech-docs/git"),
      "/src/tech-docs/geek-skills": set_sidebar("/src/tech-docs/geek-skills"),
    },

    socialLinks: [
      {
        icon: "github",
        link: "https://gitee.com/mikaisazzz",
        ariaLabel: "点击前往Mikaisa的Gitee主页",
      },
    ],

    footer: {
      copyright: "Created by Mikaisa - 那片天空叫做热爱",
    },
  },

  base: "/mikaisa-blog/",
});
